package com.lalameow.researchstation.api.technology

import com.lalameow.researchstation.util.mixin.researched
import kotlinx.serialization.Serializable
import net.minecraft.server.network.ServerPlayerEntity
import net.minecraft.text.Text

@Serializable
data class SingleTechnologyCriterion(
    val technology: Technology,
    override val name: Text = technology.name
) : TechnologyCriterion {
    override fun test(player: ServerPlayerEntity) =
        if (technology in player.researched) null else technology.name
}
